<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script src="layui/layui.js" charset="utf-8"></script>
<title>电子银行——》汇款充值——》选择支付方式</title>
<script type="text/javascript">
	$(function() {
		$("#payButton").click(function() {
			var a = $("input[name='zfSystem']:checked").val();
			if (a == null) {
				alert("请选择支付方式");
			} else {
				layui.use('layer', function(){ //独立版的layer无需执行这一句
					  var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
					  
					  //触发事件
					  var active = {
					    notice: function(){
					      //示范一个公告层
					      layer.open({
					        type: 1
					        ,title: false //不显示标题栏
					        ,closeBtn: false
					        ,area: '600px;'
					        ,shade: 0.8
					        ,id: 'LAY_layuipro' //设定一个id，防止重复弹出
					        ,btn: ['确定', '关闭']
					        ,btnAlign: 'c'
					        ,moveType: 1 //拖拽模式，0或者1
					        ,content: '<div style="padding: 50px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">交易密码：<input id="password" type="password" placeholder="请输入密码"><br><br>我们此后的征途是星辰大海 ^_^</div>'
					        ,success: function(layero){
					          var btn = layero.find('.layui-layer-btn');
					          btn.find('.layui-layer-btn0').click(function(){
					        	   $.post("PaymentVerification.do",{"bid":"${bid}"},function(data){
					        		  alert(data);
					        		  alert("${bid}");
					        	  }) 
					          });
					        }
					      });
					    }
					  };
					  
					  $('#layerDemo .layui-btn').on('click', function(){
					    var othis = $(this), method = othis.data('method');
					    active[method] ? active[method].call(this, othis) : '';
					  });
					  
					});
			}
		});
		
	});
	
	
</script>
</head>

<body class="layui-layout-body">
	<form id="form1" name="form1" method="post" action="">
		<input name="zfSystem" type="radio" value="1" id="Pay_zhifubao" />支付宝
		<br /> <input name="zfSystem" type="radio" value="2" id="Pay_weixin" />微信
	</form>
	<div class="site-demo-button" id="layerDemo" style="margin-bottom: 0;">
		<button data-method="notice" class="layui-btn" id="payButton">支付</button>
	</div>
	
</body>
</html>
